<template>
  <div class="login_container">
    <div class="login_box">
      <!-- logo去 -->
      <div class="avatar_box">
        <img src="../assets/logo.jpg" alt="logo" />
        <span>海报设计系统</span>
      </div>
      	<div class="login-wrap">
		<el-form class="login-container">
			<el-form-item label="">
				<el-input type="text" v-model="username" placeholder="登录账号" autocomplete="off"></el-input>
			</el-form-item>
			<el-form-item label="">
				<el-input type="password" v-model="password" placeholder="登录密码" autocomplete="off"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button type="primary" style="width:100%;" @click="doSubmit()">提交</el-button>
			</el-form-item>
			<el-row style="text-align: center;margin-top:-10px">
				<el-link type="primary" @click="gotoRegister()">没有账号？点击注册</el-link>
			</el-row>
		</el-form>
	</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Login',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      username:'',
      password:''
 
    }
  }
}
</script>

<style scoped>
.login_container {
  background-image: url("../assets/img.jpg");
  /* 设置图片大小 */
  background-size: 100% 100%;
  /* 设置div高度 */
  height: 100%;
}

.login_box {
  width: 450px;
  height: 400px;
  background-color: white;
  border-radius: 5px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden; /* 隐藏溢出部分 */
}

.avatar_box {
  display: flex; /* 使用 flexbox 布局 */
  align-items: center; /* 垂直居中对齐 */
  justify-content: center; /* 水平居中对齐 */
  height: 100px;
  width: 100%; /*填满父容器宽度 */
  /* box-shadow: 0 0 10px #ddd; */
}

.avatar_box img {
  height: 80px;
  width: 80px;
  border-radius: 50%;
  background-color: #eee;
  margin-right: 5px; /*图片与文字之间的间距 */
}

.avatar_box span {
  font-size: 24px; /* 调整文字大小，根据需要调整 */
  color: #333; /* 调整文字颜色，根据需要调整 */
}


.login-container {
	border-radius: 10px;
	margin: 0px auto;
	width: 350px;
	padding: 30px 35px 15px 35px;
	background: #fff;
	text-align: left;
}


</style>
